package spring.cloud.tasks.executor.name_space.executor.tasks_runtime_info.task_item_execute;

import java.util.concurrent.ConcurrentHashMap;

public class TasksExecuteRuntimeContext {
    public static final ConcurrentHashMap<String, TaskExecuteRuntimeContext> taskIdToTaskExecuteRuntimeContextMap = new ConcurrentHashMap<String, TaskExecuteRuntimeContext>();

    public static final TaskExecuteRuntimeContext getTaskExecuteRuntimeContext(String taskId) {
        TasksExecuteRuntimeContext.taskIdToTaskExecuteRuntimeContextMap.put(taskId, new TaskExecuteRuntimeContext());
        TaskExecuteRuntimeContext taskExecuteRuntimeContext = TasksExecuteRuntimeContext.taskIdToTaskExecuteRuntimeContextMap.get(taskId);
        return taskExecuteRuntimeContext;
    }
}
